-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dashboard #104
Update dashboard #104
Conversation
9f1c313
to
554d298
Compare
554d298
to
f2aeda8
Compare
201af4d
to
8075044
Compare
21db026
to
0a1547d
Compare
2b223d2
to
6aa37b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the changes requested, please also make cluster.name nullable in the schema.
|
||
class DashboardController extends Controller | ||
{ | ||
public function indexAction() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add :void
.
$this->addTitleTab($this->translate('Kubernetes')); | ||
|
||
$cluster = (new ClusterForm()) | ||
->populate(['cluster_uuid' => Session::getSession()->getNamespace('kubernetes')->get('cluster_uuid')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default in the get()
call should be ClusterForm::ALL_CLUSTERS
.
); | ||
} | ||
|
||
protected function isMultiCluster() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add :bool
.
return $this->translate('Cluster management'); | ||
} | ||
|
||
protected function assemble() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add :void
.
'node', | ||
$this->translate('Nodes'), | ||
$this->translate( | ||
'Out of %s total Nodes, %s are in OK state, %s are Critical, %s are in Warning state, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use %s
, but {total}
and so on.
return $this->translate('Observability'); | ||
} | ||
|
||
protected function assemble() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add :void
.
return $this->translate('Storage'); | ||
} | ||
|
||
protected function assemble() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add :void
.
->columns(['uuid', 'name']); | ||
|
||
foreach ($clusters as $cluster) { | ||
yield (string) Uuid::fromBytes($cluster->uuid) => $cluster->name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could do $cluster->name ?? $cluster->uuid
here and don't do it in assemble()
.
library/Kubernetes/Web/Factory.php
Outdated
@@ -138,7 +139,32 @@ public static function createList(string $kind, Rule $filter): ValidHtml | |||
} | |||
} | |||
|
|||
public static function createUrl(string $kind): ?Url | |||
public static function createModel(string $kind): Model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ?Model
as it may also return null
.
} | ||
} | ||
|
||
.control-label-group { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put those rules inside .cluster-form
and add the class to ClusterForm
.
6aa37b4
to
d349306
Compare
d349306
to
2d28cc0
Compare
No description provided.